home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- CheckForValidName()
- InitGlobals()
- InitConditions()
- InitPuppets()
- end
-
- on CheckForValidName
- nothing()
- end
-
- on InitGlobals
- global gBar, gOtherBar, gStartCast, gEndCast, gStartFrame, gEndFrame, gLevel, gTemp, gTempo
- gBar = 10
- gOtherBar = 26
- gStartCast = field("CastStart").value
- gEndCast = field("CastEnd").value
- gStartFrame = field("FrameStart").value
- gEndFrame = field("FrameEnd").value
- gTemp = 0
- gTempo = 5
- gLevel = 2
- end
-
- on InitConditions
- set the floatPrecision to 3
- end
-
- on InitPuppets
- global gBar
- puppetSprite(gBar, 1)
- puppetSprite(gOtherBar, 1)
- puppetSprite(29, 1)
- puppetSprite(30, 1)
- puppetSprite(31, 1)
- puppetSprite(32, 1)
- puppetSprite(33, 1)
- puppetSprite(34, 1)
- end
-
- on dome
- global gLevel
- UpdateGraph()
- if gLevel > 1 then
- UpdateFields()
- end if
- end
-
- on UpdateGraph
- global gBar, gOtherBar
- set the height of sprite gBar to (cast("border").height * (the freeBytes * 1.0) / the memorysize) + 1.0
- set the height of sprite gOtherBar to (cast("border").height * (the freeBlock * 1.0) / the memorysize) + 1.0
- end
-
- on UpdateFields
- put the memorysize & " = " & the memorysize / 1024 & "k" into field "memsize"
- put the freeBytes & " = " & the freeBytes / 1024 & "k" into field "freebytes"
- put the freeBlock & " = " & the freeBlock / 1024 & "k" into field "freeblock"
- put the memorysize - the freeBytes & " = " & (the memorysize - the freeBytes) / 1024 & "k" into field "MemUsed"
- end
-
- on GetValues
- global gStartCast, gEndCast, gStartFrame, gEndFrame, gTemp
- gStartCast = field("CastStart").value
- gEndCast = field("CastEnd").value
- gStartFrame = field("FrameStart").value
- gEndFrame = field("FrameEnd").value
- tell the stage
- gTemp = the number of castMembers
- end tell
- if gEndCast > gTemp then
- gEndCast = gTemp
- end if
- end
-
- on startTimer
- return the ticks
- end
-
- on PutTime now
- delta = the ticks - now
- put "ticks = " & delta into field "delta t"
- put RETURN & "secs = " & delta / 60.0 after field "delta t"
- end
-
- on InitTime
- global gNow
- gNow = the ticks
- end
-
- on CheckTime
- global gNow
- put the ticks - gNow
- end
-
- on DoRight
- set the castNum of sprite the clickOn to the number of member "Left"
- wind = window("memmon")
- leftSide = getAt(wind.rect, 1)
- topSide = getAt(wind.rect, 2)
- rightSide = getAt(wind.rect, 3)
- bottomSide = getAt(wind.rect, 4)
- wind.rect = rect(leftSide, topSide, rightSide + 128, bottomSide)
- end
-
- on DoLeft
- set the castNum of sprite the clickOn to the number of member "Right"
- wind = window("memmon")
- leftSide = getAt(wind.rect, 1)
- topSide = getAt(wind.rect, 2)
- rightSide = getAt(wind.rect, 3)
- bottomSide = getAt(wind.rect, 4)
- wind.rect = rect(leftSide, topSide, rightSide - 128, bottomSide)
- end
-
- on DoUp arrow
- if voidp(arrow) then
- set the castNum of sprite the clickOn to the number of member "down"
- else
- set the castNum of sprite 29 to 0
- updateStage()
- end if
- wind = window("memmon")
- leftSide = getAt(wind.rect, 1)
- topSide = getAt(wind.rect, 2)
- rightSide = getAt(wind.rect, 3)
- bottomSide = getAt(wind.rect, 4)
- wind.rect = rect(leftSide, topSide, rightSide, bottomSide - 86)
- end
-
- on DoDown arrow
- if voidp(arrow) then
- set the castNum of sprite the clickOn to the number of member "up"
- else
- set the castNum of sprite 29 to the number of member "up"
- end if
- wind = window("memmon")
- leftSide = getAt(wind.rect, 1)
- topSide = getAt(wind.rect, 2)
- rightSide = getAt(wind.rect, 3)
- bottomSide = getAt(wind.rect, 4)
- wind.rect = rect(leftSide, topSide, rightSide, bottomSide + 86)
- end
-
- on GetMainMovieName
- global gMovie
- tell the stage
- gMovie = the movieName
- end tell
- put gMovie into field "Moviename"
- end
-
- on ResetTabButtons
- set the backColor of sprite 31 to 250
- set the backColor of sprite 32 to 245
- set the backColor of sprite 33 to 245
- set the backColor of sprite 34 to 245
- end
-
- on TurnOffDepthPuppets
- repeat with temp = 13 to 17
- puppetSprite(temp, 0)
- end repeat
- end
-
- on TurnOffVolumePuppets
- repeat with temp = 35 to 40
- puppetSprite(temp, 0)
- puppetSprite(temp, 0)
- end repeat
- end
-
- on UpdateMeters
- mainVolHeight = 64 - (9 * the soundLevel)
- set the height of sprite 35 to mainVolHeight
- set the locV of sprite 38 to 69 + mainVolHeight - 3
- mainVolHeight = 64 - (0.251 * the volume of sound 1)
- set the height of sprite 36 to mainVolHeight
- set the locV of sprite 39 to 69 + mainVolHeight - 3
- mainVolHeight = 64 - (0.251 * the volume of sound 2)
- set the height of sprite 37 to mainVolHeight
- set the locV of sprite 40 to 69 + mainVolHeight - 3
- end
-
- on Memmon
- go(1)
- window("memmon").rect = window("memmon").sourceRect
- open(window("memmon"))
- end
-
- on InitTempoIndicator
- global gTempo
- puppetSprite(22, 0)
- puppetSprite(22, 1)
- set the locV of sprite 22 to the bottom of sprite 21 - (gTempo * 3) - 1
- end
-
- on TurnOffTempoPuppets
- puppetSprite(22, 0)
- end
-